﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true" validateRequest="false" 
    CodeFile="MaterialUpdForm.aspx.cs" Inherits="App_Master_MaterialUpdForm" Title="物资管理" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>

        <cc1:ComValidator ID="ComValidator1" runat="server" CheckItems-Capacity="4" Visible="False">
            <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="catalog1">
                <cc1:ComAbsParamsAttribute Parameter="当前目录" />
            </cc1:CheckRequiredAttribute>
        </cc1:ComValidator>
        <cc1:ComValidator ID="ComValidator2" runat="server" CheckItems-Capacity="4" Visible="False">
            <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="materialName">
                <cc1:ComAbsParamsAttribute Parameter="物资名称" />
            </cc1:CheckRequiredAttribute>
        </cc1:ComValidator>
        <table style="width: 100%; height: 100%">
            <tr>
                <td style="height: 100%; width: 20%; border-right: #000000 1px solid;" valign="top">
                    &nbsp;<asp:TreeView ID="TreeView1" runat="server" OnTreeNodeCollapsed="Node_Expanded" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"
                        OnTreeNodeExpanded="Node_Expanded" Width="100%" ImageSet="XPFileExplorer" NodeIndent="15" 
                        >
                        <Nodes>
                            <asp:TreeNode Text="物资列表" Value="0" SelectAction="SelectExpand">
                               
                            </asp:TreeNode>
                        </Nodes>
                        <ParentNodeStyle Font-Bold="False" />
                        <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
                        <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
                            VerticalPadding="0px" />
                        <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
                            NodeSpacing="0px" VerticalPadding="2px" />
                        <LevelStyles>
                            <asp:TreeNodeStyle Font-Underline="False" ImageUrl="~/images/liebiao.gif"/>
                            <asp:TreeNodeStyle Font-Underline="False" ImageUrl="~/images/mulu.gif"/>
                            <asp:TreeNodeStyle Font-Underline="False" ImageUrl="~/images/mulu.gif" />
                             <asp:TreeNodeStyle Font-Underline="False" ImageUrl="~/images/mulu.gif" />
                        </LevelStyles>
                    </asp:TreeView>
                </td>
                <td style="width: 80%; height: 100%;" valign="top">
                    <table class="table_border_line">
                        <tr>
                            <td align="left" colspan="4" style="height: 17px">

                                <script language="javascript">
                                (new TitleBar('RegisterBar', '物资管理')).showBar();
                                </script>

                            </td>
                        </tr>
                    </table>
                    <table style="height: 100%; width: 100%;">
                        <tr>
                            <td valign="top" align="center" style="height: 16px">
                                <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"
                                    Width="130px" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" AutoPostBack="True">
                                    <asp:ListItem Selected="True">目录</asp:ListItem>
                                    <asp:ListItem>物资</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" align="center">
                                <asp:MultiView ID="MultiView1" runat="server">
                                    <asp:View ID="View1" runat="server">
                                        <table>
                                            <tr>
                                                <td style="height: 38px">
                                                    当前目录：<asp:TextBox ID="catalog1" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    下级目录：<asp:TextBox ID="catalog2" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="bottom" align="center" style="height: 44px">
                                                    <asp:Button ID="save" runat="server" Text="登记" Width="80px" OnClick="save_Click" OnClientClick="return confirm('是否登入数据？')" CssClass="button"/>
                                                    <asp:Button ID="del" runat="server" Text="删除" Width="80px" OnClick="del_Click" OnClientClick="return confirm('是否删除该目录？')" CssClass="button"/>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:View>
                                    <asp:View ID="View2" runat="server">
                                        <table>
                                            <tr>
                                                <td style="height: 34px" >
                                                当前目录：<asp:Label ID="catalogLab" runat="server" Text="Label"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td >
                                                物资名称：<asp:TextBox ID="materialName" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="middle" align="center" style="height: 46px">
                                                    <asp:Button ID="save2" runat="server" Text="登记" Width="80px" OnClick="save2_Click"  OnClientClick="return confirm('是否登入数据？')" CssClass="button"/>
                                                   
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" align="center">
                                                    <asp:GridView ID="GridView1" runat="server" CssClass="GridView_table" OnRowEditing="GridView1_OnRowEditing" 
                                                                    OnRowDeleting="GridView1_OnRowDeleting"
                                                        AutoGenerateColumns="False" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" Width="261px">
                                                        <Columns>
                                                            <asp:BoundField HeaderText="名称" DataField="MaterialName">
                                                                <ItemStyle CssClass="GridView_item_center" />
                                                                <HeaderStyle CssClass="GridView_head_grayblue" />
                                                            </asp:BoundField>
                                                            <asp:CommandField HeaderText="编辑" ShowEditButton="True" ButtonType="Image" EditImageUrl="~/images/edit.jpg">
                                                                <HeaderStyle CssClass="GridView_head_grayblue" />
                                                                <ItemStyle CssClass="GridView_item_center" />
                                                            </asp:CommandField>
                                                            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                                                <ItemStyle CssClass="GridView_item_center" />
                                                                <HeaderStyle CssClass="GridView_head_grayblue" />
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                                                        ImageUrl="~/images/delete.jpg" Text="Delete" OnClientClick="return confirm('确定删除吗？')"/>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField Visible="False">
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MaterialId") %>'></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <ItemStyle CssClass="GridView_item_center" />
                                                                <HeaderStyle CssClass="GridView_head_grayblue" />
                                                                <ItemTemplate>
                                                                    <asp:Label ID="materialId" runat="server" Text='<%# Bind("MaterialId") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerStyle HorizontalAlign="Right" />
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            
                                        </table>
                                    </asp:View>
                                </asp:MultiView>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
